Unsupervised removal of text from form images

ABSTRACT

The present disclosure relates to language agnostic unsupervised removal of text from form images. According to one embodiment, a method comprises generating a spectral domain representation of an image by applying a two dimensional frequency domain transformation, where the image depicts form layout elements and text elements. Applying a first filter to the spectral domain representation to remove a portion of the frequency domain corresponding to the text element, and applying an inverse two dimensional frequency domain transformation to the filtered spectral domain representation of the image to generate a reconstructed image. The text elements are not depicted in the reconstructed image.

BACKGROUND Field

Embodiments presented herein generally relate to software applicationsthat detect and remove certain text from images, and more specificallyto an unsupervised machine-learning approach to removing text fromimages of form documents.

Description of the Related Art

Images of documents and text are common due to the ease of creatingdigital images. For example, images of completed form documents aregenerated when existing paper records are scanned or when an individualprovides digital images of paper records in their possession. Forexample, users of tax- or accounting software applications (or onlineservices) can generate images of forms by taking a picture of adocument, such a W-2, with a digital camera. Images of form documentsdepict the information in that document using an image format, e.g., anarray of pixel color values. Extracting text information from digitalimages in an electronic format is difficult.

One approach extracting data from images of forms is to classify imagesdepicting a given form using neural networks and then extract the datafrom the form using optical character recognition over regions of theimage. The neural networks currently in use for identifying a given formrequire significant amounts of training data to make accurate matches.Generating the training data set for a neural network is time intensive,costly, and presents a security risk when the documents containsensitive personal information. For instance, training a neural networkto identify W-2 forms issued by a variety of employers could expose thepersonal information in the W-2 forms to the human reviewers making theclassifications for the training set. Further, neural networks are noteasily scalable because they are not language agnostic, meaning thatseparate training sets are required for different languages.

The accuracy of the neural networks is also degraded by the presence ofimage specific text within the form layout, i.e., each person's socialsecurity number and wages will be different W-2 forms having identicalform layout elements. The neural network classification can be improvedwhen only the form layout is presented, but current methods for removingthe text elements are costly or error prone. Similarly, extracting datapresent in the form image using optical character recognition is errorprone when the optical character recognition is performed on an imagehaving both form layout and text elements. High error rates in theaccuracy of the extracted data require extensive quality control byhuman reviewers, or in some cases, may make the automatic extraction ofthe data values commercially impractical.

SUMMARY

One embodiment of the present disclosure includes a method for removingtext from form images. The method generates a frequency domainrepresentation of an image by applying a two dimensional frequencydomain transformation, where the image depicts form layout and textelements. The method applies a filter to the frequency domainrepresentation to remove a portion of the frequency domain correspondingto the text elements, and applies an inverse two dimensional (2D)frequency domain transformation to the filtered frequency domainrepresentation of the image to generate a reconstructed image. Thereconstructed image does not depict the text elements.

Another embodiment provides a computer-readable storage medium havinginstructions, which, when executed on a processor, operates to removetext from form images. The processor generates a frequency domainrepresentation of an image by applying a 2D frequency domaintransformation, where the image depicts form layout and text elements.The processor applies a filter to the frequency domain representation toremove a portion of the frequency domain corresponding to the textelements, and applies an inverse 2D frequency domain transformation tothe filtered frequency domain representation of the image to generate areconstructed image. The reconstructed image does not depict the textelements.

Still another embodiment of the present invention includes a processorand a memory storing a program, which, when executed on the processor,performs an operation for removing text from form images. The processorgenerates a frequency domain representation of an image by applying a 2Dfrequency domain transformation, where the image depicts form layout andtext elements. The processor applies a filter to the frequency domainrepresentation to remove a portion of the frequency domain correspondingto the text elements, and applies an inverse 2D frequency domaintransformation to the filtered frequency domain representation of theimage to generate a reconstructed image. The reconstructed image doesnot depict the text elements.

BRIEF DESCRIPTION OF THE DRAWINGS

So that the manner in which the above recited features of the presentdisclosure can be understood in detail, a more particular description ofthe disclosure, briefly summarized above, may be had by reference toembodiments, some of which are illustrated in the appended drawings. Itis to be noted, however, that the appended drawings illustrate onlyexemplary embodiments and are therefore not to be considered limiting ofits scope, may admit to other equally effective embodiments.

FIG. 1 illustrates an example system, according to one embodiment.

FIG. 2 is a block diagram illustrates an example image processing agent,according to one embodiment.

FIG. 3 is a block diagram illustrating an example form imagepreprocessing agent, according to one embodiment.

FIG. 4A is an example of a form image, according to one embodiment.

FIG. 4B is a graph illustrating a frequency decomposition of a signalrepresentation of a form image, according to one embodiment.

FIG. 5A is a graph illustrating an intersection filter effect on afrequency domain representation of an image, according to oneembodiment.

FIG. 5B is a graph illustrating a union filter effect on a frequencydomain representation of an image, according to one embodiment.

FIG. 5C is an example of a reconstructed form, according to oneembodiment.

FIG. 6 is a flow chart illustrating a process for removing text fromform images, according to one embodiment.

FIG. 7 illustrates an example computing system for processing a formimage, according to one embodiment.

DETAILED DESCRIPTION

Generally, extracting and classifying text and data from digital imagesis required before such images can be used by other computing processes.Although humans can classify data and enter values into a database,human review (i.e., data entry) is often a slow and costly process thatintroduces a substantial time delay between receiving data and itsavailability to the rest of the system. Human review can also pose asecurity risk because it exposes data to the individuals performing thereview. Attempts to automate data extraction and classification fromimages rely on neural networks, and have had some success. Neuralnetworks, however, require large amounts of training data that must beclassified by humans, meaning that the large time and cost overheadpersists as a prerequisite to bringing the new classification systemonline.

Embodiments presented herein provide a system for automatically removingtext from form images without requiring any training data. That is, theapproach herein uses an unsupervised learning approach to separatingtext from form layout and presentation elements. Once separated, theform layout and text can be processed independently. In one embodiment,the system applies a spectral decomposition, i.e., a decomposition basedon frequency, to an image, to create a representation of the imageelements using a group of frequencies. The system filters thefrequencies from the decomposed image to remove text content whileretaining the layout elements of the image.

To apply the spectral decomposition, the system treats the 2D arraypixels of the image as an array of signals, where each row and eachcolumn represent a separate signal. The system assigns a frequency toeach signal based on the changing pixel colors, i.e., changing fromblack to white. For example, a ten pixel row of “1100110011”representing white and black pixels as 0 and 1, respectively, has fourchanges, while “1111100000” has only one. Thus, the first ten pixel rowof the example changes color more often resulting in a higher frequencythen the second row.

Form content, such as text, tends to be tightly grouped with highfrequency variations between white spaces between and within thecharacters and the dark elements defining the characters. In contrast,layout elements of the form, i.e., lines and boxes, represent relativelylow frequency variations. In one embodiment, the form processingapplication applies a spectral decomposition of the image using a 2Ddiscrete Fourier transform (DFT) to produce a spectral domainrepresentation of the image. That is, the spectral decompositionrepresents creates a spectral or frequency domain representation of theimage as by analyzing the image as a series of signals whose frequenciesare represented by the changes in color present in the rows and columnsof pixels in the image. The system filters the spectral domain image toremove high frequency elements presumed to depict text within the imageof the form. The low frequency elements presumed to depict the layoutelements of the form remain in the spectral domain image. The systemapplies an inverse 2D DFT to the filtered spectral domain representationto create a reconstructed image that includes the form layoutrepresented by the low frequency elements but not text elementsrepresented by the high frequency components.

Similarly, high frequency components removed from the spectral domainimage can be used to reconstruct an image containing the text elementswithout the layout elements shown in the image. The system uses thereconstructed form image (without the text) to identify the form, e.g.,as matching a known form template. Further, the system can processestext from the reconstructed text image using an OCR agent. Once the formimage is matched to a template, the system can map the text data intofields of a database. For example, a text value “10,000” extracted froma W-2 does not, by itself, provide enough context to know what the10,000 represents. Mapping the extracted value to a field in the knowntemplate provides the necessary context because it locates the text inthe area for taxable wages or federal tax withholding, for example. Inthe case where the reconstructed form does not match any of the knownform templates, i.e., the system has not encountered this form layoutbefore, the reconstructed form can be reviewed by a human withoutrepresenting a security risk because text elements containing sensitivepersonal information have been removed.

Note embodiments described herein use tax forms, such as a W-2, as areference example of forms having both layout elements and textelements. Of course, one of ordinary skill in the art will recognizethat embodiments presented herein using these examples may be adaptedfor a broad variety of form content or form types.

FIG. 1 illustrates an example system 100, according to one embodiment.As shown, system 100 includes an image processing agent 110, a formtemplate database 120, an application server 130, and a database 140,which communicate over network 150. Image processing agent 110 isconfigured to receive images from application server 130, database 140,or from a third party through network 150. The images generally includeimages of a given form which depict both text related to an instance ofthe form and the layout of the form itself, i.e., a completed tax formor another application. Image processing agent 110 extracts andclassifies the data contained in the image by removing text from theimage to create a form layout image and a text image.

FIG. 2 illustrates an example image processing agent, according to oneembodiment. Image processing agent 110 includes a form preprocessingagent 200, a form classification agent 210, and an OCR agent 220. Formpreprocessing agent 200 receives an image from a user or anotherapplication through network 150. For example, a user submits an image ofW-2 provided by his employer. Once received, the form preprocessingagent 200 separates the text elements from the form layout elements.That is, the form preprocessing agent 200 generates an image of the formin a “blank” or unused state that is used for more accurate matchingwith form templates. Form preprocessing agent 200 generates a separateimage of the text elements without the form layout element that is usedfor more accurate text data extraction.

For example, the form preprocessing agent 200 may determine a 2D DFT ofthe image, resulting in a spectral domain representation. Generally, aDFT transformation represents a signal as a frequency spectrum that canbe modified using high-pass, low-pass, or band-pass filters. Formpreprocessing agent 200 analyzes the image as a 2D spatial-domainsignal, i.e., in X-Y coordinates treating the X-axis as a firstspatial-domain signal and the Y-axis as a second spatial domain signal.Each row of pixels on the X-axis is treated as a signal whose frequencyvaries according to the number of variation in pixel color. Similarly,each column of pixels on the Y-axis is also treated as a frequencyvarying with the number of pixel color changes. The layout elements offorms tend to be continuous lines in either the X or Y directions thatwill have little or no color variation in the axis parallel to the line.Text elements, however, tend to have frequent color changes due thedensely grouped and individually defined characters. For example, lineelements defining the boxes on a W-2 form are nearly constant comparedto the variation seen across the text values within the boxes. Thus, thespectral domain representation from the 2D DFT allows the text and formelements to be identified and grouped together by frequency.

FIG. 3 illustrates an example preprocessing agent, according to oneembodiment. As shown, form preprocessing agent 200 includes an imagemanager 300, a spectral analysis agent 310, and a filter agent 320. Theimage manager 300 receives images sent to the image processing agent 110and provides the images to the spectral analysis agent 310. For example,as part of a tax preparation process available to users over theinternet, image processing agent 110 receives images the user's taxforms. In order for the tax preparation process to compute the user'stax, the system must extract the text elements from the image andprovide context for the elements to define what they represent, i.e., isan extracted text element of “$10,000” the amount of wages or taxeswithheld? Form preprocessing agent 200 removes the text elements fromthe form image by creating a spectral representation of the image thatcan be filtered to remove the text. The resulting “empty” form isprovided to form classification agent 210 for matching, while a textimage is provided to OCR agent 220 to extract text elements.

In one embodiment, spectral analysis agent 310 prepares the image forfiltering and generates reconstructed images after filtering. Forexample, the spectral analysis agent 310 calculates the 2D DFT to createa spectral domain representation used by filter agent 320 to separatethe text element and form elements in the image. Spectral analysis agent310 receives filtered spectral domain representations from filter agent320 generates reconstructed images by calculating a reversetransformation.

In an embodiment, the spectral analysis agent 310 applies a 2D DFT,S_(kl), for a 2D spatial signal s_(pq), represented as:

$S_{kl} = {\frac{1}{MN}{\sum\limits_{p = 0}^{M - 1}{\sum\limits_{q = 0}^{N - 1}{s_{pq}e^{{- i}\; 2\;\pi\; p\;{k/M}}e^{{- i}\; 2\;\pi\;{{ql}/N}}}}}}$where s_(pq) represents the gray-scale value of the image pixel atcoordinate (p,q). For example, FIG. 4A illustrates a form imageincluding form layout elements and text elements and FIG. 4B illustratesa spectral domain representation of the form image shown in FIG. 4A. Asshown in FIG. 4B, the spectral domain representation of the form fromFIG. 4A generally depicts a well-defined horizontal line at the midpointof the y-axis and a well-defined vertical line at the midpoint of thex-axis. These two lines, forming a cross shape, define the low frequencyform layout elements from the image in FIG. 4A. After generating thespectral domain representation of the form image, spectral analysisagent 310 provides the spectral domain representation to filter agent320.

Filter agent 320 removes text elements from the form image by applying afilter to the spectral domain representation generated by the spectralanalysis agent 310. The filter identifies the high frequency elements ofthe spectral domain representation that are treated as text elements. Byfiltering the high frequency elements from the spectral domainrepresentation, the text elements are removed, while the lower frequencyelements representing the form layout elements are preserved.

In one embodiment, filter agent 320 removes text elements using a 2Dlow-pass filter, L_(kl) including frequencies in a narrow k and l band,be represented as:

$L_{kl} = {\left( {{k} \leq \frac{B_{x}}{2}} \right)\bigcup\left( {{l} \leq \frac{B_{y}}{2}} \right)}$2D low-pass filters use an intersection operator (∩) in the constructionof the filter. That is, only elements with a low frequency in both the Xand Y directions are preserved with the intersection operation. However,restricting the filter to only those elements with low frequencies inboth dimensions leads to the loss of high frequency elements thatcontribute to the form layout in addition to text, which degrades theability to reconstruction the form. FIG. 5A illustrates an example of a2D filter using an intersection operator applied to the spectral domainrepresentation shown in FIG. 4A. As shown, the intersection filterallows in a circular or rectangular frequency space to remain, but thepassing frequencies have low frequencies in both the X and Y directions.FIG. 5B illustrates and example 2D filter using a union operator appliedto the spectral domain representation shown in FIG. 4A. As shown, theunion allows the filter to be tailored limit the frequency component forone dimension while allowing high frequency for the other dimension.That is, FIG. 5B illustrates a very low frequency for threshold for boththe X and Y axes, but the union operator allow any component with a Xfrequency below the threshold to pass, and any frequency below the Ythreshold to pass, regardless of the components frequency in the otherdirection (Y and X, respectively). The shape of the 2D filter effectshow well the form layout elements are maintained, where the filter shapeshown in FIG. 5B (preserving the elements with low frequency in one ofthe two dimensions) may more accurately identify and preserve layoutelements.

In one embodiment, spectral analysis agent 310 creates a reconstructedform image from the filtered spectral domain representation using aninverse transformation. That is, spectral analysis agent 310 calculatesan inverse 2D DFT transform to generate an image from the spectraldomain representation. FIG. 5C illustrates an example of a reconstructedform image from the filtered spectral domain representation in FIG. 5B.A reconstructed image generated from a low-pass filtered spectral domainrepresentation contains the form elements with the text elementsremoved. A reconstructed image generated from a high-pass filteredspectral domain representation contains the text elements with the formelements removed. In one embodiment, spectral analysis agent 310 createsthe reconstructed image, s′_(pq) using the inverse transformation:

$s_{pq}^{\prime} = {\sum\limits_{k = 0}^{M - 1}{\sum\limits_{l = 0}^{N - 1}{S_{kl}e^{i\; 2\;\pi\; p\;{k/M}}e^{i\; 2\;\pi\;{{ql}/N}}}}}$Form preprocessing agent 200 sends reconstructed form images to the formclassification agent 210 and reconstructed text images to OCR agent 220by image manager 300.

In an embodiment, image manager 300 subdivides images received by thepreprocessing agent 200 into a plurality of sub-images. Each suchsub-image may be submitted to the spectral analysis agent 310. Spectralanalysis agent 310 generates a spectral domain representation for eachsub-image and filter agent 320 applies a filter to each sub-imagespectral domain representation. Filter agent 320 can apply differentfilters to some or all of the sub-image spectral domain representationsto improve clarity of the form elements in reconstructed form imagesgenerated from the sub-image spectral domains. Image manager 300combines the reconstructed form images generated from the sub-images tocreate a reconstructed composite form image of the original image.

Form classification agent 210 is configured to match the layout in thereconstructed form image to a known form template from the form templatedatabase 120 using machine learning engine. Form classification agent210 receives the reconstructed form image from image manager 300 andattempts to match the form layout depicted in the reconstructed formimage to a known form layout. For example, form classification agent 210may match the reconstructed form image to a known form layout using avariety of machine learning approaches, e.g., a neural network analysisof the reconstructed form image. In using a classification approach,machine learning engine is trained using form layouts from the formtemplate database 120, which includes form templates and classificationdata for the fields and or boxes of the form. If form classificationagent 210 cannot match the form image to a form template using themachine learning algorithm, form classification agent 210 can mark thereconstructed form image for human review and classification.

However, in cases where human review of a form is needed, thereconstructed form image does not contain any personal identifyinginformation because the text elements have been removed. Thus, when thesystem encounters a form image with a new form layout that could requirehuman classification, such as a new W-2 from an employer, the sensitivepersonal information in the form, such as social security number andearnings, will have been removed. In an embodiment, human review ofreconstructed form images are necessary to establish a training set forthe machine learning algorithm or for human classification of forms whenthe machine learning cannot identify a match.

OCR agent 220 identifies text elements for the form image by analyzingthe reconstructed text image. OCR agent 220 processes the reconstructedtext image using an optical character recognition algorithm configuredto detect and text elements in the reconstructed text image and generatetext from the content of the image. The text elements may be stored indatabase 140 and searched by application server 130. The digital textelements generated by OCR agent 220 are provided to image processingagent 110, which uses the classification result from the formclassification agent 210 to map the text elements onto the appropriateboxes of the form template. That is, the mapping provides context toidentify what the text elements represent, i.e., “$10,000” of wages andtips vs. taxes withheld for a W-2. Image processing agent 110 stores thetext elements in database 140 in fields corresponding to the contextprovided by the classification agent 210 mapping.

FIG. 6 illustrates a process for removing text from form images,according to one embodiment. As shown, the process 600 begins at step610 with the image processing agent 110 receiving a form image. Forexample, the image processing agent 110 would receive an image of a W-2from user of an online tax preparation website, and the image of the W-2would enter process 600 at step 610. At step 620, a spectral analysisagent of the preprocessing agent performs a spectral decomposition ofthe form image. Doing so results in a spectral or frequency domainrepresentation. As noted, this representation allows high frequencycomponents corresponding to text elements to be separated from lowfrequency components corresponding to form layout elements by filteringthe frequencies.

At step 630, filter agent may remove the text elements from the spectraldomain representation. For example, the filter agent may apply a 2Dlow-pass filter to remove high frequency elements associated with text.Further, in some embodiments, filter agent may generate a separatespectral domain representation by applying a 2D high-pass filter toremove the form layout elements from the spectral domain representation.In step 640, form preprocessing agent applies an inverse transformationto the low-pass filtered spectral domain representation to create areconstructed form image containing the form layout elements with thetext elements removed. At step 650, preprocessing agent applies aninverse transformation to the high-pass filtered spectral domainrepresentation to create a reconstructed text image with the formelements removed.

At step 660, form classification agent analyzes the reconstructed formimage and matches it to a known form template from form templatedatabase. At step 670, OCR agent generates text elements by applying anoptical character recognition process to the reconstructed text image.At step 680, the image processing agent maps the text elements generatedby OCR agent onto a form template identified by the form classificationagent. The mapping provides context for the text elements that is neededto store the text elements in the appropriate fields in a database.Image processing agent stores the digital text elements in database inthe field each digital text element is mapped into.

FIG. 7 illustrates an example computing system for processing a formimage. As shown, the system 700 includes, without limitation, a centralprocessing unit (CPU) 705, one or more I/O device interfaces 710 whichmay allow for the connection of various I/O devices 715 (e.g. keyboards,displays, mouse devices, pen inputs, etc.) to the system 700, networkinterface 720, a memory 725, storage 730, and an interconnect 735.

CPU 705 may retrieve and execute programming instructions stored in thememory 725. Similarly, the CPU 705 may retrieve and store applicationdata residing in memory 725. The interconnect 735, transmits programminginstructions and application data, among the CPU 705, I/O deviceinterface 710, network interface 720, memory 725, and storage 730. CPU705 is included to be representative of a single CPU, multiple CPUs, asingle CPU having multiple processing cores, and the like. Additionally,the memory 725 is included to be representative of a random accessmemory. Furthermore, the storage 730 may be a disk drive, solid statedrive, or a collection of storage devices distributed across multiplestorage systems. Although shown as a single unit, the storage 730 may bea combination of fixed and/or removable storage devices, such as fixeddisc drives, removable memory cards or optical storage, network attachedstorage (NAS), or a storage area-network (SAN).

As shown, memory 725 includes image processing agent 740 including animage preprocessing agent 745, a form classification agent 750, and anOCR agent 760. Image preprocessing agent 745 is generally configured toprocess form images received via network 150 or I/O devices 715. Imagepreprocessing agent 745 is configured to remove the text elements fromthe form image by performing a spectral decomposition using a 2D DFT tocreate a spectral domain representation of the form image. Imagepreprocessing agent 745 filters the spectral domain representation byapplying a 2D low-pass filter to create a low-pass filtered spectraldomain representation with the text elements removed. The imagepreprocessing agent separately applies a 2D high-pass filter to thespectral domain representation to create a high-pass filtered spectraldomain representation with the form layout elements removed. Imagepreprocessing agent 745 applies an inverse 2D DFT to the low-passfiltered spectral domain representation to create a reconstructed formimage, and applies an inverse 2D DFT to the high-pass filtered spectraldomain representation to create a reconstructed text image. Imagepreprocessing agent 745 provides the reconstructed form image to formclassification agent 750 and the reconstructed text image to OCR agent760.

Form classification agent 750 is configured to match the reconstructedform image to a known form template. Form classification agent 750 usesa machine learning algorithm to match the reconstructed form image to aknown form template. The machine learning algorithm uses a collection ofknown form templates stored in form template database 120 maintained instorage 730, as shown, or alternatively, accessible via network 150. Inan embodiment, the machine learning algorithm is a neural networkconfigured to match form images. Form classification agent 750 providesthe matching form template to image preprocessing agent 745.

OCR agent 760 is configured to generate text elements from thereconstructed text image. OCR agent 760 uses an optical characterrecognition algorithm to generate a text element corresponding to eachtext section depicted in the reconstructed text image. OCR agent 760provides the text elements to image preprocessing agent 745.

Image preprocessing agent 745 maps the text elements onto the field andbox elements in the form template to provide context for the textelements. Image preprocessing agent 745 stores the text elements indatabase 140 as data in the field each text element is mapped into.Database 140 is maintained in storage 730, as shown, or alternatively,is accessible via network 150. Once the text elements are stored intheir respective fields in database 140, the information is availablefor use by other applications through network 150.

Note, descriptions of embodiments of the present disclosure arepresented above for purposes of illustration, but embodiments of thepresent disclosure are not intended to be limited to any of thedisclosed embodiments. Many modifications and variations will beapparent to those of ordinary skill in the art without departing fromthe scope and spirit of the described embodiments. The terminology usedherein was chosen to best explain the principles of the embodiments, thepractical application or technical improvement over technologies foundin the marketplace, or to enable others of ordinary skill in the art tounderstand the embodiments disclosed herein.

In the preceding, reference is made to embodiments presented in thisdisclosure. However, the scope of the present disclosure is not limitedto specific described embodiments. Instead, any combination of thepreceding features and elements, whether related to differentembodiments or not, is contemplated to implement and practicecontemplated embodiments. Furthermore, although embodiments disclosedherein may achieve advantages over other possible solutions or over theprior art, whether or not a particular advantage is achieved by a givenembodiment is not limiting of the scope of the present disclosure. Thus,the aspects, features, embodiments and advantages discussed herein aremerely illustrative and are not considered elements or limitations ofthe appended claims except where explicitly recited in a claim(s).Likewise, reference to “the invention” shall not be construed as ageneralization of any inventive subject matter disclosed herein andshall not be considered to be an element or limitation of the appendedclaims except where explicitly recited in a claim(s).

Aspects of the present disclosure may take the form of an entirelyhardware embodiment, an entirely software embodiment (includingfirmware, resident software, micro-code, etc.) or an embodimentcombining software and hardware aspects that may all generally bereferred to herein as a “circuit,” “module” or “system.” Furthermore,aspects of the present disclosure may take the form of a computerprogram product embodied in one or more computer readable medium(s)having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples a computer readable storage medium include: anelectrical connection having one or more wires, a hard disk, a randomaccess memory (RAM), a read-only memory (ROM), an erasable programmableread-only memory (EPROM or Flash memory), an optical fiber, a portablecompact disc read-only memory (CD-ROM), an optical storage device, amagnetic storage device, or any suitable combination of the foregoing.In the current context, a computer readable storage medium may be anytangible medium that can contain, or store a program.

While the foregoing is directed to embodiments of the presentdisclosure, other and further embodiments of the disclosure may bedevised without departing from the basic scope thereof, and the scopethereof is determined by the claims that follow.

What is claimed is:
 1. A method for removing text from form imagescomprising: generating a frequency domain representation of an image byapplying a two dimensional frequency domain transformation to the image,wherein the image depicts at least a portion of a form and wherein theform includes layout elements and text elements; removing a portion ofthe frequency domain representation that represents the text elements byapplying a first filter to the frequency domain representation,producing a first filtered frequency domain representation; generating areconstructed image of at least the portion of the form by applying aninverse two dimensional frequency domain transformation to the firstfiltered frequency domain representation, wherein the reconstructedimage does not depict the text elements; removing a portion of thefrequency domain representation that represents the layout elements byapplying a layout filler to the frequency domain representation,producing a second filtered frequency domain representation; generatinga reconstructed text image by applying an inverse two dimensionalfrequency domain transformation to the second filtered frequency domainrepresentation, wherein the reconstructed text image does not depict thelayout elements; matching the reconstructed image to a form template;generating text from the reconstructed text image; and mapping a portionof the text to a corresponding field of the form template based on aposition of the portion of the text in the reconstructed text image. 2.The method of claim 1, wherein the reconstructed image is matched to theform template using a neural network.
 3. The method of claim 1, whereinthe layout filter comprises a two dimensional high-pass filter.
 4. Asystem, comprising: a processor; and memory storing instructions which,when executed on the processor, operate to remove text from form images,the operation comprising: generating a frequency domain representationof an image by applying a two dimensional frequency domaintransformation to the image, wherein the image depicts at least aportion of a form and wherein the form includes layout elements and textelements; removing a portion of the frequency domain representation thatrepresents the text elements by applying a first filter to the frequencydomain representation, producing a first filtered frequency domainrepresentation; generating a reconstructed image of at least the portionof the form by applying an inverse two dimensional frequency domaintransformation to the first filtered frequency domain representation,wherein the reconstructed image does not depict the text elements;removing a portion of the frequency domain representation thatrepresents the layout elements by applying a layout filter to thefrequency domain representation, producing a second filtered frequencydomain representation; generating a reconstructed text image by applyingan inverse two dimensional frequency domain transformation to the secondfiltered frequency domain representation, wherein the reconstructed textimage does not depict the layout elements; matching the reconstructedimage to a form template; generating text from the reconstituted textimage; and mapping a portion of the text to a corresponding field of theform template based on a position of the portion of the text in thereconstructed text image.
 5. The system of claim 4, wherein thereconstructed image is matched to the form template using a neuralnetwork.
 6. The system of claim 4, wherein the layout filter comprises atwo dimensional high-pass filter.
 7. A non-transitory computer-readablemedium comprising instructions which, when executed by one or moreprocessors, performs an operation for removing text from form images,the operation comprising: generating a frequency domain representationof an image by applying a two dimensional frequency domaintransformation to the image, wherein the image depicts at least aportion of a form and wherein the form includes layout elements and textelements; removing a portion of the frequency domain representation thatrepresents the text elements by applying a first filter to the frequencydomain representation, producing a first filtered frequency domainrepresentation; generating a reconstructed image of at least the portionof the form by applying an inverse two dimensional frequency domaintransformation to the first filtered frequency domain representation,wherein the reconstructed image does not depict the text elements;removing a portion of the frequency domain representation thatrepresents the layout elements by applying a layout filter to thefrequency domain representation, producing a second filtered frequencydomain representation; generating a reconstructed text image by applyingan inverse two dimensional frequency domain transformation to the secondfiltered frequency domain representation, wherein the reconstructed textimage does not depict the layout elements; matching the reconstructedimage to a form template; generating text from the reconstructed textimage; and mapping a portion of the text to a corresponding field of theform template based on a position of the portion of the text in thereconstructed text image.
 8. The non-transitory computer-readable mediumof claim 7, wherein the operation further comprises: upon determining anamount of layout elements is below a threshold, adjusting the portion ofthe frequency domain removed by modifying the filter; and generating amodified reconstructed image by applying an inverse two dimensionalfrequency domain transformation to the frequency domain representationafter being filtered with the modified filter.
 9. The non-transitorycomputer-readable medium of claim 8, wherein the operation furthercomprises: generating a frequency domain representation of a secondimage by applying a two dimensional frequency domain transformation,wherein the second image depicts at least a second portion of the form;removing a portion of the frequency domain representation representingthe text elements of the second image by applying a second filter to thefrequency domain representation of the second image, producing afiltered frequency domain representation of the second image; andgenerating a reconstructed second image by applying an inversetwo-dimensional frequency domain transformation to the filteredfrequency domain representation of the second image, wherein the textelement is not depicted in the reconstructed image; and generating acomposite form image by combining the reconstructed image and thereconstructed second image.
 10. The non-transitory computer-readablemedium of claim 7, wherein the reconstructed image is matched to theform template using a neural network.
 11. The non-transitorycomputer-readable medium of claim 7, wherein the layout filter comprisesa two dimensional high-pass filter.
 12. The non-transitorycomputer-readable medium of claim 7, wherein the two dimensionalfrequency domain transformation applied to the image is a twodimensional discrete Fourier transform.